package datebase

import (
	"github.com/jinzhu/gorm"
	_ "github.com/jinzhu/gorm/dialects/postgres"
)

var (
	DB *gorm.DB
)

func InitPostgres() (err error) {
	DB, err = gorm.Open("postgres", "host=127.0.0.1 port=5432 user=cow11023 dbname=bubble password=Cowzyr299025")
	if err != nil {
		return
	}
	return DB.DB().Ping()
}
